import {CHECKWORKDATA} from './actionType'
import { fromJS,List } from 'immutable'   

//这里不使用 fromJS 的原因是list 下面只有一层数据，使用fromJS消耗的性能更大
const defaultState =fromJS({
    list:[]
})

const reducer = (state=defaultState,action)=>{
    switch(action.type){
        case CHECKWORKDATA:
            return state.set('list',List(action.list))
        default:
            return state
    }
}

export default reducer